-
Notifications
You must be signed in to change notification settings - Fork 741
Add Python 3.13 support #16004
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Python 3.13 support #16004
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/16004
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New FailuresAs of commit 6bf40e1 with merge base d318b3b ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
I need to add a "release notes: misc" label, but I don't seem to have the ability to. |
|
the tests under Need to look into this further. |
Things are better in with a newer nightly build of torch, so I've bumped the pinned version as part of this PR too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds Python 3.13 support to ExecuTorch now that coremltools 9.0 (which supports Python 3.13) is available. The changes update version constraints, documentation, and CI/CD workflows to enable building wheels for Python 3.13.
Key changes:
- Update Python version constraint from
<3.13to<3.14in pyproject.toml - Add Python 3.13 to wheel building workflows and documentation
- Remove Python 3.13 warning from CoreML troubleshooting documentation
- Update nightly version pin (unrelated maintenance update)
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Add Python 3.13 classifier, update requires-python constraint to <3.14, add py313 to ruff target-version |
| torch_pin.py | Update nightly version from dev20251025 to dev20251124 |
| docs/source/*.md | Update Python version requirements from 3.10-3.12 to 3.10-3.13 across multiple documentation files |
| docs/source/backends/coreml/coreml-troubleshooting.md | Remove outdated Python 3.13 compatibility warning |
| README-wheel.md | Add Python 3.13 to list of supported versions |
| .github/workflows/*.yml | Add "3.13" to Python version matrices for wheel building workflows |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
pyproject.toml
Outdated
| ] | ||
|
|
||
| # Python dependencies required for use. | ||
| # coremltools has issue with python 3.13, see https://github.com/apple/coremltools/issues/2487 |
Copilot
AI
Dec 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment is now outdated since Python 3.13 is being supported. Either remove the comment entirely or update it to reflect that the issue was resolved in coremltools 9.0 (e.g., '# coremltools 9.0+ supports python 3.13, see apple/coremltools#2487').
| # coremltools has issue with python 3.13, see https://github.com/apple/coremltools/issues/2487 | |
| # coremltools 9.0+ supports python 3.13, see https://github.com/apple/coremltools/issues/2487 |
pyproject.toml
Outdated
| ] | ||
|
|
||
| # Python dependencies required for use. | ||
| # coremltools has issue with python 3.13, see https://github.com/apple/coremltools/issues/2487 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this comment?
|
@PetarTerziev-UL can you please bump the nightly version of pytorch to 1122 instead? I think the nightly job failed to build 1124 nightly. |
coremltools versions prior to 9.0 did not support Python 3.13. Now executorch uses 9.0, we can finally enable building wheels with Python 3.13.
The Python tests in examples/models/lama3_2_vision/preprocess/test_preprocess was hanging on MacOS with the previous nightly pinned here when installed with Python 3.13.
7fbf70d to
6bf40e1
Compare
Done! Is there a way to check nightly job statuses? I was looking at wheels available at download.pytorch.org and drawing assumptions. |
Summary
coremltools versions prior to 9.0 did not support Python 3.13. Now executorch uses 9.0, we can finally enable building wheels with Python 3.13.
Fixes #8292
Test plan
Python test suite ran and compared against a dev install of the target branchh in a 3.12 virtual environment.